<!DOCTYPE html>
<html>
<head>
<head />
<div th:include="base-libs :: base-libs" />
<title>服务项详情</title>
<style type="text/css">
.topBtn{
	float: right;
	margin-right:10px;
	margin-top:5px
}
	.YBXM{
		display:none;
	}
</style>
</head>
<script type="text/javascript">
	$(function() {
        $(this).registerManagerPage({
            cacheTables: ["TB_ZY_YBXM"]
            ,callback: initData
        });
	});
	
	function initData(){
		/**加载数据*/
		var fwCache = StoreCache.removeCache("FWXX_INFO");
		console.log(JSON.stringify(fwCache))
		if(fwCache){
			fwCache["FWLB"] = fwCache["FWLBMC"];
			fwCache["FWZT"] = getFwzt(fwCache["FWZT"]);
			fwCache["CJSJ"] =  fwCache["CJSJ"].substr(0,10);
			fwCache["FWPC"] = getFwpc(fwCache);
			fwCache["SFBZ"] = getSfbz(fwCache);

			if(fwCache["QYLB"] == "01"){
				$("#XZBLTR").hide();
			}else{
				$("#FWLBTR").hide();
			}
			if(fwCache["XZBL"] == "0"){
				fwCache["XZBL"] = "否";
			}else if(fwCache["XZBL"] == "1"){
				fwCache["XZBL"] = "是";
			}
			//fwCache["QYLB"] = fwCache["QYLBMC"];
			/**加载详情数据*/
			$(".table").find("span").each(function(){
				$(this).text(fwCache[$(this).attr("class")]);
			});

            fwCache["YBXM"] = fwCache.YBXMXMDM;
			 var YBXMXMDM = fwCache.YBXMXMDM;
			 if(!StringUtils.isEmpty(YBXMXMDM)){
			 	var TB_ZY_YBXM = StoreCache.removeCache("TB_ZY_YBXM").data;
				$.each(TB_ZY_YBXM, function(){
				    if(this.XMDM == YBXMXMDM){
                        $("#YBXM").html(this.XMMC);
                        $(".YBXM").show();
                        $(".fwlbTb").removeAttr("colspan");
				        return false;
					}
				})

			 }
		}
	}
	
	/**返回列表页面*/
	function back(){
		$.QuickUrlUtils.redirectUrl("index.html");
	}
	
	/**获取服务状态*/
	function getFwzt(fwzt){
		if(fwzt == "0"){
			fwzt = "停用";
		}
		else if(fwzt == "1"){
			fwzt = "启用";
		}
		return fwzt;
	}
	
	/**获取服务频次*/
	function getFwpc(info){
		return getSflx(info["FWPCLX"]) + "," + info["FWPC"];
	}
	
	/**获取服务频次类型*/
	function getFwpclx(fwpclx){
        var fwpclxObj = {"01":"按次计算","02":"按签约周期计算"}
		return fwpclxObj[fwpclx] || fwpclx;
	}
	
	/**获取收费标准*/
	function getSfbz(info){
		return getSflx(info["SFLX"]) + "," + info["SFBZ"];
	}
	
	/**获取收费类型*/
	function getSflx(sflx){
        var sflxObj = {"01":"按次收费","02":"按月收费","03":"按签约周期收费","04":"免费"};
		return sflxObj[sflx] || sflx;
	}
</script>

<body class="easyui-layout">
	<div region="north" style="border: none; overflow: hidden;">
		<h4 class="h4-title" style="font-size: 18px;">
			服务项信息
			<button class="btn topBtn" style="float:right" type="button" onclick="back()">返回</button>
			<!-- <div style="float:right;margin-top:-7px;">
				<button class="btn" type="button" onclick="back()" >返回</button>
			</div> -->
		</h4>
	</div>
	<div region="center" style="border: none">
		<div class="form-table-box" >
			<table class="form-table table">
					<tr>
						<td class="td-text">服务项编号：</td>
						<td class="td-content">
							<span class="FWID"></span>
						</td>
						<td class="td-text">服务项名称：</td>
						<td class="td-content">
							<span class="FWMC"></span>
						</td>
					</tr>
					
					<tr>
						<td class="td-text">所属机构：</td>
						<td class="td-content">
							<span class="YLJGMC"></span>
						</td>
						<td class="td-text">签约类别：</td>
						<td class="td-content">
							<span class="QYLBMC"></span>
						</td>
					</tr>
					
					<tr id="FWLBTR">
						<td class="td-text">服务项类别：</td>
						<td class="td-content fwlbTb" colspan="3">
							<span class="FWLB"></span>
						</td>
						<td class="td-text YBXM">医保项目：</td>
						<td class="td-content YBXM">
							<span id="YBXM"></span>
						</td>
					</tr>
					<tr id="XZBLTR">
						<td class="td-text">选择病例：</td>
						<td class="td-content" colspan="3">
							<span class="XZBL"></span>
						</td>
					</tr>
					
					<tr>
						<td class="td-text">服务内容：</td>
						<td class="td-content" colspan="3">
							<span class="FWNR"></span>
						</td>
					</tr>
					
					<!-- <tr>
						<td class="td-text">服务频次：</td>
						<td class="td-content" colspan="3">
							<span class="FWPC"></span>
						</td>
					</tr> -->
					
					<tr>
						<td class="td-text">收费标准：</td>
						<td class="td-content" colspan="3">
							<span class="SFBZ"></span>
						</td>
					</tr>
					
					<tr>
						<td class="td-text">状态：</td>
						<td class="td-content" >
							<span class="FWZT"></span>
						</td>
						<td class="td-text">创建时间：</td>
						<td class="td-content">
							<span class="CJSJ"></span>
						</td>
					</tr>
					<tr>
						<td class="td-text">备注：</td>
						<td class="td-content" colspan="3">
							<span class="BZ"></span>
						</td>
					</tr>
				</table>
			</div>
		</div>
</body>
</html>


